<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>用户登录</title>
<link href="<%=path %>/resource/images/login.css" rel="stylesheet" type="text/css" />
<script src="<%=path %>/resource/js/jquery-1.7.2.min.js" language="javascript" ></script>
<script>
$(document).ready(function(){
	$("#uname").val("admin");
	$("#pwd").val("admin");
	$("#btnlogin").bind("click",function(){
		$.ajax({
			   type: "POST",
			   url: "<%=path%>/sys/login.do",
			   dataType:"json",
			   data: {
				   uname:$("#uname").val(),
				   pwd	:$("#pwd").val(),
			   },
			   success: function(rf){
			     if(rf.flag){
			    	 location.href="<%=path%>/sys/toindex.do";
			     }else{
			    	 alert("用户名或密码错误");
			     }
			   }
			});
	});
	$("#btnlogin").click();
});
</script>
</head>
<body>

    <div id="login">
	
	     <div id="top">
		      <div id="top_left"><img src="<%=path %>/resource/images/login_03.gif" /></div>
			  <div id="top_center"></div>
		 </div>
		 
		 <div id="center">
		      <div id="center_left"></div>
			  <div id="center_middle">
			       <div id="user">用 户
			         <input type="text" id="uname" name="uname" />
			       </div>
				   <div id="password">密   码
				     <input type="password" id="pwd" name="pwd" />
				   </div>
				   <div id="btn"><a id="btnlogin" href="javascript:void(0)" onclick="">登录</a><a href="#">清空</a></div>
			  
			  </div>
			  <div id="center_right"></div>		 
		 </div>
		 <div id="down">
		      <div id="down_left">
			      <div id="inf">
                       <span class="inf_text">版本信息</span>
					   <span class="copyright">管理信息系统 2008 v2.0</span>
			      </div>
			  </div>
			  <div id="down_center"></div>		 
		 </div>

	</div>
</body>
</html>
